%% @private
-module(cn2p_product_catalog_service_sup).
-behaviour(supervisor).

%% API.
-export([start_link/0]).

%% supervisor.
-export([init/1]).

%% API.
-spec start_link() -> {ok, pid()}.

start_link() ->
	supervisor:start_link({local, ?MODULE}, ?MODULE, []).

%% supervisor.

init([]) ->
  {ok, {Store, StoreContext}} = application:get_env(cn2p_product_catalog_service, store),
  CatalogSpec = {cn2p_catalog, {cn2p_catalog, start_link, [Store, StoreContext]}, permanent, 5000, worker, [cn2p_catalog]},

	Procs = [CatalogSpec],
	{ok, {{one_for_one, 10, 10}, Procs}}.
